package com.aolong.archives.core.sysmanage.entity;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.aolong.archives.common.util.Const;
import com.rock.platform.entity.BaseEntity;
import com.rock.platform.util.SessionUtils;

@Entity
@Table(name="TSM_DataDictionary")
public class DataDictionaryEntity extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	private String dictionaryId;
	private String category;
	private String code;
	private String value;
	private String memo;
	private int displayOrder;
	private String valueEn;
	private int type = 1;
	
    @Transient
    private String valueLocale;
	
	public String getDictionaryId() {
		return dictionaryId;
	}
	public void setDictionaryId(String dictionaryId) {
		this.dictionaryId = dictionaryId;
	}
	public String getCategory() {
		return category;
	}
	public void setCategory(String category) {
		this.category = category;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	public int getDisplayOrder() {
		return displayOrder;
	}
	public void setDisplayOrder(int displayOrder) {
		this.displayOrder = displayOrder;
	}
	public String getValueEn() {
		return valueEn;
	}
	public void setValueEn(String valueEn) {
		this.valueEn = valueEn;
	}
	public String getValueLocale() {
		return Const.LANGUAGE_en_US.equals(SessionUtils.getAttributeText(SessionUtils.SKEY_LANGUAGE)) ? this.valueEn : this.value;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}	
}
